var _EsdDynamicTransformationFunction = function($){
/**
* 命名空间定义
*/
var _EsdDynamicTransformationScript = {};
_EsdDynamicTransformationScript.navBlock = {}; // 定义区域跳转类
_EsdDynamicTransformationScript.navBlock.selector = {};
/**
* 文本链接 a
*/
//保证所有a标签都有href
$("a").each(function(){

var aHref = this.href;
if( aHref=="" || aHref==undefined ){
$(this).attr("href","javascript:void(0)");
}

//给a标签加title
var aTitle = this.title;
var aText = this.text;

if( aTitle=="" || aTitle==undefined ){
if( aText!="" || aText!=undefined ){
$(this).attr("title",$.trim(aText));
}
}

});


//select下的option添加title
$("option").each(function(){
var oTitle = this.title;
var oText = this.text;
if( oTitle=="" || oTitle==undefined ){
if( oText!="" || oText!=undefined ){
$(this).attr("title",$.trim(oText));
}
}
});


//为目录页的翻页添加title
if( $(".CurrChnlCls").length > 0 ){
$('#num').attr({'title':'页数', 'placeholder':'页数'});
$('.zt9 input[type="submit"]').attr({'title':'跳转按钮', 'placeholder':'跳转按钮'});
}



/**
* 图片处理片段
*/

$('img[src="//dcs.conac.cn/image/red.png"]').attr('title','党政机关图标').attr('alt','党政机关图标');$('img[src="./images/gabatb.png"]').attr('title','国徽图标').attr('alt','国徽图标');$('img[src="https://pucha.kaipuyun.cn/exposure/images/jiucuo.png?v=2200000031"]').attr('title','无效图片').attr('alt','无效图片');$('img[src="./tpxw09/201910/W020191024613317257375.jpg"]').attr('title','省政府常务副省长吴靖平到省国资委调研指导工作').attr('alt','省政府常务副省长吴靖平到省国资委调研指导工作');$('img[src="./tpxw09/201906/W020190628404258101709.jpg"]').attr('title','省国资委组织机关及直属事业单位全体党员观看电影《大会师》').attr('alt','省国资委组织机关及直属事业单位全体党员观看电影《大会师》');$('img[src="./images/icon_more_red_201801gzw.png"]').attr('title','更多图标').attr('alt','更多图标');$('img[src="./jljlgqyfc09/201801/W020180119346054293501.jpg"]').attr('title','吉林银行图标').attr('alt','吉林银行图标');$('img[src="./images/ico_fk_201801gzw.gif"]').attr('title','装饰图片').attr('alt','装饰图片');$('img[src="./jljlgqyfc09/201003/W020100329479076234708.jpg"]').attr('title','吉林信托图标').attr('alt','吉林信托图标');$('img[src="./jljlgqyfc09/201003/W020100329477489686822.jpg"]').attr('title','吉林森工图标').attr('alt','吉林森工图标');$('img[src="./jljlgqyfc09/201801/W020180119349250585374.jpg"]').attr('title','省投集团图标').attr('alt','省投集团图标');$('img[src="./jljlgqyfc09/201801/W020180119314711965239.png"]').attr('title','吉高集团图标').attr('alt','吉高集团图标');$('img[src="./tpxw09/201907/W020190722336583759982.jpg"]').attr('title','关于国务院“互联网+督查”平台征集问题线索和典型经验做法的公告').attr('alt','关于国务院“互联网+督查”平台征集问题线索和典型经验做法的公告');$('img[src="./tpxw09/201810/W020181022329172538448.jpg"]').attr('title','国务院国资委党委书记郝鹏同志到吉林森工集团调研指导工作').attr('alt','国务院国资委党委书记郝鹏同志到吉林森工集团调研指导工作');$('img[src="./images/icon_more_black_201801gzw.png"]').attr('title','更多图标').attr('alt','更多图标');$('img[src="./jljlgqyfc09/201003/W020100329422993641295.jpg"]').attr('title','吉林担保图标').attr('alt','吉林担保图标');$('img[src="./tpxw09/201910/W020191029349492780541.jpg"]').attr('title','省国资委系统党风廉政建设和反腐败工作推进会召开').attr('alt','省国资委系统党风廉政建设和反腐败工作推进会召开');$('img[src="./images/P020180201540935921561.jpg"]').attr('title','党的建设').attr('alt','党的建设');$('img[src="./jljlgqyfc09/201706/W020180119354886270538.jpg"]').attr('title','吉林交投图标').attr('alt','吉林交投图标');$('img[src="./jljlgqyfc09/201801/W020180119348137768835.jpg"]').attr('title','吉林水投图标').attr('alt','吉林水投图标');$('img[src="./jljlgqyfc09/201801/W020180119350785287081.jpg"]').attr('title','吉林金控集团图标').attr('alt','吉林金控集团图标');$('img[src="./jljlgqyfc09/201409/W020140929549997579681.jpg"]').attr('title','吉粮资产图标').attr('alt','吉粮资产图标');$('img[src="./jljlgqyfc09/201801/W020180131356274074935.jpg"]').attr('title','吉林昊融图标').attr('alt','吉林昊融图标');

//img
$("img").each(function(){
//给图片加alt/title
var imgAlt = this.alt,
imgTitle = this.title,
imgSrc = this.src,
parentText = this.parentElement.text;

if(this.alt=="" || this.alt==undefined){
if(imgTitle!="" && imgTitle!=undefined){
$(this).attr("alt",imgTitle);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("alt",parentText);
}
}
if(this.title=="" || this.title==undefined){
if(imgAlt!="" && imgAlt!=undefined){
$(this).attr("title",imgAlt);
}else if(parentText!="" && parentText!=undefined){
$(this).attr("title",parentText);
}
}
})

$("img").each(function(){
if( (this.alt=="" && this.title=="")||(this.alt==undefined && this.title==undefined) ){
$(this).attr("title","图片");
$(this).attr("alt","图片");
}
})
/**
* 共通头部
*/
$(".search_box input[type='submit']").attr("title","查询");
/**
* 主导航
*/
/**
* 网站所有幻灯片
*/
//轮播,右下角原点--鼠标点击触发情况

//轮播：只获取轮播中一个a标签。
//以文字a标签为主，图片a标签尽量不要，title不稳定

//轮播前的标签
_EsdDynamicTransformationScript.esdTagFrontNum1 = $("#form_cds .search_box input:eq(1)");

//文字A标签
_EsdDynamicTransformationScript.esdTagANum1 = $("#D1pic1 .fcon:eq(0) .shadow a");
_EsdDynamicTransformationScript.esdTagANum2 = $("#D1pic1 .fcon:eq(1) .shadow a");
_EsdDynamicTransformationScript.esdTagANum3 = $("#D1pic1 .fcon:eq(2) .shadow a");
_EsdDynamicTransformationScript.esdTagANum4 = $("#D1pic1 .fcon:eq(3) .shadow a");
_EsdDynamicTransformationScript.esdTagANum5 = $("#D1pic1 .fcon:eq(4) .shadow a");

//原点
_EsdDynamicTransformationScript.esdTagCircleNum1 = $("#D1fBt a:eq(0) i");
_EsdDynamicTransformationScript.esdTagCircleNum2 = $("#D1fBt a:eq(1) i");
_EsdDynamicTransformationScript.esdTagCircleNum3 = $("#D1fBt a:eq(2) i");
_EsdDynamicTransformationScript.esdTagCircleNum4 = $("#D1fBt a:eq(3) i");
_EsdDynamicTransformationScript.esdTagCircleNum5 = $("#D1fBt a:eq(4) i");

//轮播后的标签
_EsdDynamicTransformationScript.esdTagAfterNum1 = $(".gzyw_box .title1_box .title1_more a");


//轮播前的焦点
_EsdDynamicTransformationScript.esdTagFrontNum1.focus(function (e) {
$(document).bind("keydown.keydown_0", function (e) {
if(e.shiftKey&&e.keyCode==9){

}else if (e.keyCode == 9) {
if(_EsdDynamicTransformationScript.esdTagANum1.length!=0){
_EsdDynamicTransformationScript.esdTagCircleNum1.click();
_EsdDynamicTransformationScript.esdTagANum1.focus();
//						_EsdDynamicTransformationScript.esdTagFrontNum1.blur();
return false;
}
}
});
});
_EsdDynamicTransformationScript.esdTagFrontNum1.blur(function () {
$(document).unbind("keydown.keydown_0");
});



//第一块
_EsdDynamicTransformationScript.esdTagANum1.focus(function (e) {

//			_EsdDynamicTransformationScript.esdTagCircleNum1.click();
$(document).bind("keydown.keydown_1", function (e) {
if(e.shiftKey&&e.keyCode==9){
//触发原网站的幻灯片播放
Qfast(false, 'widgets', function () {
K.tabs({
id: 'fsD1',   //焦点图包裹id
conId: "D1pic1",  //** 大图域包裹id
tabId:"D1fBt",
tabTn:"a",
conCn: '.fcon', //** 大图域配置class
auto: 1,   //自动播放 1或0
effect: 'fade',   //效果配置
eType: 'click', //** 鼠标事件
pageBt:true,//是否有按钮切换页码
bns: ['.prev', '.next'],//** 前后按钮配置class
interval: 3000  //** 停顿时间
})
})
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum2.click();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum1.blur(function () {
$(document).unbind("keydown.keydown_1");
});

//第二块
_EsdDynamicTransformationScript.esdTagANum2.focus(function (e) {

//			_EsdDynamicTransformationScript.esdTagCircleNum2.click();
$(document).bind("keydown.keydown_2", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum1.click();
_EsdDynamicTransformationScript.esdTagANum1.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum3.click();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum2.blur(function () {
$(document).unbind("keydown.keydown_2");
});

//第三块
_EsdDynamicTransformationScript.esdTagANum3.focus(function (e) {

//			_EsdDynamicTransformationScript.esdTagCircleNum3.click();
$(document).bind("keydown.keydown_3", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum2.click();
_EsdDynamicTransformationScript.esdTagANum2.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum4.click();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum3.blur(function () {
$(document).unbind("keydown.keydown_3");
});

//第四块
_EsdDynamicTransformationScript.esdTagANum4.focus(function (e) {
//			_EsdDynamicTransformationScript.esdTagCircleNum4.click();
$(document).bind("keydown.keydown_4", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum3.click();
_EsdDynamicTransformationScript.esdTagANum3.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagCircleNum5.click();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum4.blur(function () {
$(document).unbind("keydown.keydown_4");
});

//第五块
_EsdDynamicTransformationScript.esdTagANum5.focus(function (e) {

//			_EsdDynamicTransformationScript.esdTagCircleNum5.click();
$(document).bind("keydown.keydown_5", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum4.click();
_EsdDynamicTransformationScript.esdTagANum4.focus();
return false;
}else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.esdTagAfterNum1.focus();
//触发原网站的幻灯片播放
Qfast(false, 'widgets', function () {
K.tabs({
id: 'fsD1',   //焦点图包裹id
conId: "D1pic1",  //** 大图域包裹id
tabId:"D1fBt",
tabTn:"a",
conCn: '.fcon', //** 大图域配置class
auto: 1,   //自动播放 1或0
effect: 'fade',   //效果配置
eType: 'click', //** 鼠标事件
pageBt:true,//是否有按钮切换页码
bns: ['.prev', '.next'],//** 前后按钮配置class
interval: 3000  //** 停顿时间
})
})
return false;
}
});

});
_EsdDynamicTransformationScript.esdTagANum5.blur(function () {
$(document).unbind("keydown.keydown_5");
});

//轮播后的焦点
_EsdDynamicTransformationScript.esdTagAfterNum1.focus(function (e) {

$(document).bind("keydown.keydown_6", function (e) {
if(e.shiftKey&&e.keyCode==9){
_EsdDynamicTransformationScript.esdTagCircleNum5.click();
_EsdDynamicTransformationScript.esdTagANum5.focus();
return false;
}else if (e.keyCode == 9) {

}
});

});
_EsdDynamicTransformationScript.esdTagAfterNum1.blur(function () {
$(document).unbind("keydown.keydown_6");
});



if(location.href=="http://gzw.jl.gov.cn/index.html" || location.href=="http://gzw.jl.gov.cn/"){
//=================================================	国务院iframe 开始=================================================
//将iframe所包含的a链接数 第一个a元素 最后一个a元素赋值给第一个参数的js对象
_EsdDynamicTransformationScript.getIframeInfos = function(jsObj,iframeObj){
if(iframeObj != undefined){
jsObj.aLink_num = iframeObj.contentWindow.document.getElementsByTagName("a").length;
jsObj.first_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[0];
jsObj.last_aLink = iframeObj.contentWindow.document.getElementsByTagName("a")[jsObj.aLink_num-1];
jsObj.self = iframeObj;
}
};

//声明iframe操作对象
_EsdDynamicTransformationScript.iframe1 = {};
_EsdDynamicTransformationScript.iframe2 = {};

_EsdDynamicTransformationScript.iframeElement1 = document.getElementsByTagName("iframe")[0];   // 需要修改 这里的iframe获取
_EsdDynamicTransformationScript.iframeElement2 = document.getElementsByTagName("iframe")[1];   // 需要修改 这里的iframe获取

//选项卡标签 jquery对象
_EsdDynamicTransformationScript.iframeTab1 = $("#tab2_t1 a");  // 需要修改 这里的tab获取
_EsdDynamicTransformationScript.iframeTab2 = $("#tab2_t2 a");  // 需要修改 这里的tab获取

// 判断iframe是否有效
if((_EsdDynamicTransformationScript.iframeElement1!=undefined) && (_EsdDynamicTransformationScript.iframeElement2!=undefined)){

// 当iframe都加载完毕后执行代码 使用setInterval
_EsdDynamicTransformationScript.iframeInterval = setInterval(function(){

if((_EsdDynamicTransformationScript.iframeElement1.contentWindow.document.getElementsByTagName("a")[0]!=undefined)
&&_EsdDynamicTransformationScript.iframeElement2.contentWindow.document.getElementsByTagName("a")[0]!=undefined ){
clearInterval(_EsdDynamicTransformationScript.iframeInterval);

//通过方法赋值
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe1,_EsdDynamicTransformationScript.iframeElement1);
_EsdDynamicTransformationScript.getIframeInfos(_EsdDynamicTransformationScript.iframe2,_EsdDynamicTransformationScript.iframeElement2);

//第一个标签 切换
_EsdDynamicTransformationScript.iframeTab1.focus(function (e) {
e = $(this).mouseover();
$(document).bind("keydown.iframeKeydown_1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.trigger("blur");
$("#maq a:last").focus();
return false;
} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab1.trigger("blur");
$(_EsdDynamicTransformationScript.iframe1.self).focus();
return false;
}
});
});
_EsdDynamicTransformationScript.iframeTab1.blur(function () {
$(document).unbind("keydown.iframeKeydown_1");
});

//第一个标签的第一个链接
$(_EsdDynamicTransformationScript.iframe1.first_aLink).focus(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).bind("keydown.iframeKeydown_first1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
$(document).trigger("blur");
_EsdDynamicTransformationScript.iframeTab1.focus();
return false;
} else if (e.keyCode == 9) {
}
});
});
$(_EsdDynamicTransformationScript.iframe1.first_aLink).blur(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).unbind("keydown.iframeKeydown_first1");
});

//第一个标签的最后一个链接
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).bind("keydown.iframeKeydown_first1", function (e) {
if (e.shiftKey && e.keyCode == 9) {
} else if (e.keyCode == 9) {
$(document).trigger("blur");
_EsdDynamicTransformationScript.iframeTab2.focus();
return false;
}
});
});
$(_EsdDynamicTransformationScript.iframe1.last_aLink).blur(function () {
$(_EsdDynamicTransformationScript.iframe1.self.contentWindow.document).unbind("keydown.iframeKeydown_first1");
});


//第二个标签切换
_EsdDynamicTransformationScript.iframeTab2.focus(function (e) {
e = $(this).mouseover();
$(document).bind("keydown.iframeKeydown_2", function (e) {
if (e.shiftKey && e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.trigger("blur");
_EsdDynamicTransformationScript.iframeTab1.mouseover();
$(_EsdDynamicTransformationScript.iframe1.last_aLink).focus();
return false;
} else if (e.keyCode == 9) {
_EsdDynamicTransformationScript.iframeTab2.trigger("blur");
$(_EsdDynamicTransformationScript.iframe2.self).focus();
return false;
}
});

});
_EsdDynamicTransformationScript.iframeTab2.blur(function () {
$(document).unbind("keydown.iframeKeydown_2");
});
}

}, 500);

}

//=================================================	国务院iframe 结束=================================================
$("select[name='select1']").attr("title","全国国资系统网站");
$("select[name='select2']").attr("title","省直部门网站");
$("select[name='select3']").attr("title","地市国资网站");
$("select[name='select4']").attr("title","出资企业网站");
}

/**
* 二级页
*/

//-------------------------二级页----------------------------------
if(location.href=="http://gzw.jl.gov.cn/zczx/"){
_EsdDynamicTransformationScript.iframeInputInterval = setInterval(function(){
if(document.getElementsByTagName("iframe")[0].contentWindow.document.getElementsByTagName("input")[0]!=undefined){
clearInterval(_EsdDynamicTransformationScript.iframeInputInterval);
var inputIframe = document.getElementsByTagName("iframe")[0].contentWindow.document;
$(inputIframe).find("#frmData input:eq(0)").attr({placeholder:"咨询人",title:"咨询人"});
$(inputIframe).find("#frmData input:eq(1)").attr({placeholder:"联系电话",title:"联系电话"});
$(inputIframe).find("#frmData input:eq(2)").attr({placeholder:"通讯地址",title:"通讯地址"});
$(inputIframe).find("#frmData input:eq(3)").attr({placeholder: "电子邮件",title:"电子邮件"});
$(inputIframe).find("#frmData input:eq(4)").attr({placeholder: "标题",title:"标题"});
$(inputIframe).find("#frmData textarea:eq(0)").attr({placeholder:"内容",title:"内容"});
}
}, 500);
}
/**
* 共通底部处理
*/
//定义跳转 使用jquery选择器语法
//主要修改部分把网站对应的选择器赋值给相应的变量。或用jquery把默认的id复制给网站的元素****************************此处重要位置修改
_EsdDynamicTransformationScript.navBlock.selector.top = ".new_head";
_EsdDynamicTransformationScript.navBlock.selector.nav = ".new_banner";
_EsdDynamicTransformationScript.navBlock.selector.footer = "table:last";
_EsdDynamicTransformationScript.navBlock.selector.main = ".main_box";   // 网站比较特殊首页有两个main_box...没有统一的div包围只能写一个
_EsdDynamicTransformationScript.navBlock.selector.left = ".qrn_left_tree_box";
_EsdDynamicTransformationScript.navBlock.selector.right = ".qrn_right_tree_box";
_EsdDynamicTransformationScript.navBlock.selector.content = ".contentPage";

//给栏目的class属性添加navBlock值来标识这是需要切的栏目区块。
_EsdDynamicTransformationScript.navBlock.activateArray = [
".new_head", ".new_banner", ".main_box", "#fsD1", ".gzyw_box", ".public_box .left_min_box",
".public_box .right_min_box", ".right_box", ".ban_scroll", ".public_box:eq(3)", ".public_box:eq(4)",
".tabBox:eq(0)", ".tabBox:eq(1)", ".tabBox:eq(2)", "table:eq(12)",



".qrn_left_tree_box", ".qrn_right_tree_box", ".contentPage", "table:last",
]

for(var i=0; i<_EsdDynamicTransformationScript.navBlock.activateArray.length;i++){
$(_EsdDynamicTransformationScript.navBlock.activateArray[i]).addClass("navBlock");
}




/**
* 区域导航、调试开关
*/

$(document).bind("keydown.keydown_9001", function(e) {
if (e.shiftKey && e.keyCode == 20) {
$("*").focus(function() {
$(this).css({
"outline" : "2px dashed red"
});
});
$("*").blur(function() {
$(this).css({
"outline" : "0px black"
});
});
}
});

_EsdDynamicTransformationScript.navBlock.debug = true; // 是否是调试模式，调试模式有红边线，非调试模式关闭红边框
_EsdDynamicTransformationScript.navBlock.selector.activate = ".navBlock"; // 激活的采用class因为会激活多个
// 快捷键定义区
//_EsdDynamicTransformationScript.navBlock.key = {};

//_EsdDynamicTransformationScript.navBlock.key.top = "alt+1"; // (top)
//_EsdDynamicTransformationScript.navBlock.key.nav = "alt+2"; // (nav)
//_EsdDynamicTransformationScript.navBlock.key.main = "alt+3"; // (main)
//_EsdDynamicTransformationScript.navBlock.key.content = "alt+4"; // (content)
//_EsdDynamicTransformationScript.navBlock.key.left = "alt+5"; // (left)
//_EsdDynamicTransformationScript.navBlock.key.right = "alt+6"; // (right)
//_EsdDynamicTransformationScript.navBlock.key.footer = "alt+7"; // (footer)
//_EsdDynamicTransformationScript.navBlock.key.down = "alt+8"; // (down)
//_EsdDynamicTransformationScript.navBlock.key.up = "alt+9"; // (up);

// 以下变量主要用于区块跳转
_EsdDynamicTransformationScript.navBlock.sIndex = -1; // 当前栏目下标
_EsdDynamicTransformationScript.navBlock.maxIndex = -1; // 保存目前所有class="navBlock"的区域块总数量，栏目总量下标。
_EsdDynamicTransformationScript.navBlock.minIndex = 0; // 栏目数量起始下标

// 主要代码区域

// 导航跳转
_EsdDynamicTransformationScript.navBlock.keyShowSelect = function(i) {
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, el) {
if (i == index) {
_EsdDynamicTransformationScript.navBlock.debugView(el);
$(el).find("a").each(function(i, e) {
if (i == 0) {
$(e).focus();
}
});

}
});
}

// 获取所有class=navBlock的区域的总数量，初始化轮训所有需要跳转的块
$(_EsdDynamicTransformationScript.navBlock.selector.activate).each(function(index, ehx) {
_EsdDynamicTransformationScript.navBlock.maxIndex++;
});



// 快捷键功能区域
// 跳转到头部alt+1(49)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 49) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.top);
}

});
// 跳转到导航alt+2(50)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 50) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.nav);
}

});
// 跳转到主要区域alt+3(51)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 51) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.main);
}
});

// 跳转到正文区域alt+4(52)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 52) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.content);
}
});

// 跳转到左区域alt+5(53)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 53) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.left);
}
});

// 跳转到右区域alt+6(54)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 54) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.right);
}
});
// 跳转到底部alt+7(55)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 55) {
_EsdDynamicTransformationScript.navBlock.keySelectScroll(_EsdDynamicTransformationScript.navBlock.selector.footer);
}
});
//前进alt+8(56)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 56) {
if (_EsdDynamicTransformationScript.navBlock.sIndex < _EsdDynamicTransformationScript.navBlock.maxIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex++;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});

// 后退alt+9(57)
$(document).keydown(function(e) {
if (e.altKey && e.keyCode == 57) {
if (_EsdDynamicTransformationScript.navBlock.sIndex > _EsdDynamicTransformationScript.navBlock.minIndex) {
_EsdDynamicTransformationScript.navBlock.sIndex--;
_EsdDynamicTransformationScript.navBlock.keyShowSelect(_EsdDynamicTransformationScript.navBlock.sIndex);
}
}
});
// 特定区域跳转
_EsdDynamicTransformationScript.navBlock.keySelectScroll = function(id) {
if ($(id).length > 0) {
_EsdDynamicTransformationScript.navBlock.appendIns(id,true);//插入ins
_EsdDynamicTransformationScript.navBlock.debugView(id);
$(id).find("a").each(function(index) {
if (index == 0) {
$(this).focus();
}
});
_EsdDynamicTransformationScript.navBlock.appendIns(id,false);//清楚ins
} else {
}

}
//为了解决漂浮高等于0的情况下区域显示是一条线
_EsdDynamicTransformationScript.navBlock.appendIns=function(id,b){
if(b==true){
$(id).append("<ins id='esdNavBlockIns' style='clear: both;display: block;'></ins>")
}else{
$("#esdNavBlockIns").remove();
}
}

if (_EsdDynamicTransformationScript.navBlock.debug == true) {
// 如果开启调试模式，添加调试绘制矩形边线
$("body").append("<div id='show_top' class='lineshow'></div>");
$("body").append("<div id='show_bottom' class='lineshow'></div>");
$("body").append("<div id='show_left' class='lineshow'></div>");
$("body").append("<div id='show_right' class='lineshow'></div>");
$(".lineshow").css({
"display" : "none"
});
}
// 开启调试模式后会显示红边
_EsdDynamicTransformationScript.navBlock.debugView = function(e) {
if (_EsdDynamicTransformationScript.navBlock.debug == true) {
var x = $(e).offset();
//var w = parseInt($(e).css("width"));
var w = $(e).outerWidth();//返回元素的宽度（包含 padding 和 border）
//var h = parseInt($(e).css("height"));
var h = $(e).outerHeight();//返回元素的高度（包含 padding 和 border）
$("#show_top").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_bottom").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top + h,
"left" : x.left,
"width" : w,
"height" : "0px"
});
$("#show_left").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left,
"width" : "0px",
"height" : h
});
$("#show_right").css({
"z-index" : "9999",
"border" : "red 2px solid",
"position" : "absolute",
"top" : x.top,
"left" : x.left + w,
"width" : "0px",
"height" : h
});
$("html,body").animate({
scrollTop : $("#show_top").offset().top
}, 200);
$(".lineshow").css({
"display" : "block"
});
}
}
};
/**
* 主入口方法
*/

if (window.jQuery == undefined) {
var wzaInitInterval = setInterval(function(){
if(document.body!=null){
clearInterval(wzaInitInterval);
//			var originalWindowOnload = null;
//			if(window.onload!=null){
//				originalWindowOnload = window.onload;
//			}
document.body.onload = function(){
//				originalWindowOnload();
var esdJquery = document.createElement("script");
esdJquery.setAttribute("type", "text/javascript");
esdJquery.setAttribute("src", window.location.protocol + "//" + window.location.href.split("/")[2] + "/wza/bwscript/jquery-1.12.4.min.js");
esdJquery.setAttribute("charset", "utf-8");
esdJquery.setAttribute("id", "ESDWebAppInnerIframe");
document.body.appendChild(esdJquery);
var jqueryLoadInterval = setInterval(function () {
if (window.jQuery != undefined) {
clearInterval(jqueryLoadInterval);
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//						_EsdDynamicTransformationFunction(jQuery)
}
}, 500);
};
}
}, 10);
} else {
jQuery(function(){
setTimeout( _EsdDynamicTransformationFunction(jQuery) , 1000 );
//		_EsdDynamicTransformationFunction(jQuery)
})

}
